home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 359 / def / convert.def < prev    next >
Encoding:
Modula Definition  |  1989-01-09  |  3.1 KB  |  76 lines

  1. (*      File name: Conversions.def                              *)
  2. (*      Creation : Orginal m2m File                             *)
  3. (*      Function : Number to string conversion                  *)
  4. (*      By       : ETH                                          *)
  5. (*                                                              *)
  6. (*
  7. *    Copyright (c) 1985,1986,1987,1988,1989 by
  8. *    ana-systems, Foster City, California.
  9. *    All Rights Reserved.
  10. *
  11. *    This software is furnished under a license and may be used and copied
  12. *    only  in accordance with  the  terms  of  such  license and  with the
  13. *    inclusion of the above copyright notice.  This software or  any other
  14. *    copies thereof may not be provided or otherwise made available to any
  15. *    other  person.   No title to and ownership of the  software is  herby
  16. *    transferred.
  17. *
  18. *    The information in this software is  subject to change without notice
  19. *    and  should  not be construed as a commitment by ana-systems.   No
  20. *    warranty is implied or expressed.
  21. *    SCCID  = "1.1    1/26/86"; 
  22. *)
  23. (*      History of modifcation                                  *)
  24. (*      Date            Who             Why                     *)
  25. (*      7/5/84          Morris          Change to BTS           *)
  26. (*                                                              *)
  27. DEFINITION MODULE Convert;                  (* LG *)
  28.    
  29.   EXPORT QUALIFIED IntToStr,StrToInt, 
  30.                    CardToStr, StrToCard,
  31.                    NumToStr, StrToNum,
  32.                    OctalToStr,HexToStr;
  33.                    
  34.  
  35.   PROCEDURE OctalToStr(num, len: CARDINAL; VAR str: ARRAY OF CHAR;
  36.                         VAR success : BOOLEAN);
  37.     (* conversion of an octal number to a string *) 
  38.  
  39.   PROCEDURE HexToStr(num, len: CARDINAL; VAR str: ARRAY OF CHAR;
  40.                         VAR success : BOOLEAN);
  41.     (* conversion of a hexadecimal number to a string *) 
  42.  
  43.   PROCEDURE CardToStr  (card: CARDINAL; VAR str: ARRAY OF CHAR;
  44.                                width : CARDINAL;
  45.                            VAR success : BOOLEAN);
  46.   
  47.     (* conversion of a cardinal decimal number to a string *) 
  48.  
  49.   PROCEDURE IntToStr      (int: INTEGER; 
  50.                            VAR str: ARRAY OF CHAR; 
  51.                                width : CARDINAL;
  52.                            VAR success : BOOLEAN);
  53.   
  54.   PROCEDURE NumToStr      (num: CARDINAL; 
  55.                            VAR str: ARRAY OF CHAR; 
  56.                                base :  CARDINAL;
  57.                                width : CARDINAL;
  58.                            VAR success : BOOLEAN);
  59.  
  60.   PROCEDURE StrToInt ( VAR str: ARRAY OF CHAR;
  61.                        VAR int : INTEGER;
  62.                        VAR success : BOOLEAN);
  63.  
  64.   PROCEDURE StrToCard ( VAR str: ARRAY OF CHAR;
  65.                        VAR card : CARDINAL;
  66.                        VAR success : BOOLEAN);
  67.  
  68.   PROCEDURE StrToNum ( VAR str: ARRAY OF CHAR;
  69.                        VAR num : CARDINAL;
  70.                           base :  CARDINAL;
  71.                        VAR success : BOOLEAN);
  72.  
  73.     (* conversion of an integer decimal number to a string *) 
  74. END Convert.
  75.